Label		Mnemonic		Operands		Comments
; prog1.asm
PROG1		.ORIG			0x3000
		LADR			$R4,OPERAND1
		LADR			$R5,OPERAND2
		LADR			$R3,RESULT
		LADR			$R7,LOOP
		LADR			$R8,DONE
		LDI			$R6,#0
LOOP		ADD			$R6,$R4
		SUBI			$R5,#1
		BRz			$R8			; address of DONE in $R8
		BR			$R7			; address of LOOP in $R7
DONE		STW			$R6,$R3
		MOVB			$R0,$R6
		OUT			VID			; print value to video as if ascii char
		HALT
OPERAND1	.FILL			#10			; store 0x000A
OPERAND2	.FILL			#4			; store 0x0004
RESULT		.RSW			1			; reserve 1 word of space